import Vue from 'vue'
Vue.directive('auth',{
inserted (el,obj) {
let array=obj.value
let userInfo=JSON.parse(localStorage.getItem('userInfo') || {}) 
let falg=userInfo.roles.find(item=>array.find(element=>item.roleName==element))
if (!falg) {
    el.remove()
}
}
})